{% extends 'base.html.twig' %}

{% block title %}Test index{% endblock %}

{% block body %}
    <h1>Test index</h1>

    <table class="table">
        <thead>
        <tr>
            <th>Id</th>
            <th>Name</th>
            <th>Sex</th>
            <th>State</th>
            <th>actions</th>
        </tr>
        </thead>
        <tbody>
        {% for test in tests %}
            <tr>
                <td>{{ test.id }}</td>
                <td>{{ test.name }}</td>
                <td>{{ test.sex ? 'Yes' : 'No' }}</td>
                <td>{{ test.state ? 'Yes' : 'No' }}</td>
                <td>
                    <a href="{{ path('test_show', {id: test.id}) }}" class="btn btn-sm btn-primary">
                        <i class="fa fa-show" aria-hidden="true"></i> {{ 'action.show'|trans }}
                    </a>
                    <a href="{{ path('test_edit', {'id': test.id}) }}" class="btn btn-sm btn-primary">
                        <i class="fa fa-edit" aria-hidden="true"></i> {{ 'action.edit'|trans }}
                    </a>
                </td>
            </tr>
        {% else %}
            <tr>
                <td colspan="5">no records found</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    <a href="{{ path('test_new') }}" class="btn btn-sm btn-primary">
        <i class="fa fa-newspaper-o" aria-hidden="true"></i> {{ 'action.create'|trans }}
    </a>
{% endblock %}